#/usr/bin/env python
# -*- coding: utf8 -*-
# title       :
# description :
# author      :'ShenMeng'

import maya.cmds as cmds


class Validation():
    name = u'History | 历史检查'
    order = 100
    dataDict = dict()

    def execute(self):
        u'历史记录'
        self.dataDict = {}
        nodeList = cmds.ls(type='mesh')
        if nodeList:
            for node in nodeList:
                dataList = cmds.listHistory(node)
                dataList.remove(node)
                if dataList:
                    self.dataDict[node] = dataList
        return self.dataDict

    def correct(self):
        cmds.delete(all=1, ch=1)

    def search(self, obj):
        cmds.select(obj)
